<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
<div id="app">

    <input type="button" value="浪起来" v-on:click="lang">
    <input type="button" value="低调">
    <br>
     {{msg}}

</div>

<script src="./node_modules/vue/dist/vue.js"></script>
<script>


   var vm = new Vue({
       el:"#app",   //el，element：即要渲染的页面元素
       data:{
           msg:"-我们86期，都有三年经验-"
        },
       methods:{
           lang:function () {

               setInterval(()=> {

               var starStr = this.msg.substring(0,1);
               var endStr = this.msg.substring(1);
                this.msg=endStr + starStr
               },400)
           }
       },
       beforeCreate() {
           console.log("beroreCreate"+this.msg);
       },
       Created() {
           //发送ajax请求数据
           console.log("created"+this.msg);
       },
       beforeMount() {
           console.log("beforeMount"+this.msg);
       },
       mounted() {
           console.log("mounted"+this.msg);
       },
       beforeUpdate() {
           console.log("beforeUpdate");
       },
       updated() {
           console.log("updated");
       },
       beforeDestroy() {
           console.log("beforeDestroy");
       },
       destroyed() {
           console.log("destroyed");
       }


   });
</script>
</body>
</html>